Skip to content

Comments

refactor(semantic): store comments as a slice instead of &Vec#13336

Merged
graphite-app[bot] merged 1 commit intomainfrom
08-27-refactor_semantic_store_comments_as_a_slice_instead_of_vec_
Aug 27, 2025
Merged

refactor(semantic): store comments as a slice instead of &Vec#13336
graphite-app[bot] merged 1 commit intomainfrom
08-27-refactor_semantic_store_comments_as_a_slice_instead_of_vec_

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Aug 27, 2025

Semantic storing comments as a &Vec<Comment> involves unnecessary indirection (pointer to a pointer). Store as &[Comment] slice instead.

@github-actions github-actions bot added A-semantic Area - Semantic C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Aug 27, 2025
Copy link
Member Author

overlookmotel commented Aug 27, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@codspeed-hq
Copy link

codspeed-hq bot commented Aug 27, 2025

CodSpeed Instrumentation Performance Report

Merging #13336 will not alter performance

Comparing 08-27-refactor_semantic_store_comments_as_a_slice_instead_of_vec_ (d787517) with main (3c34767)1

Summary

✅ 34 untouched benchmarks

Footnotes

  1. No successful run was found on main (d787517) during the generation of this report, so 3c34767 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@overlookmotel overlookmotel force-pushed the 08-27-refactor_semantic_store_comments_as_a_slice_instead_of_vec_ branch from fe07544 to cb2a00e Compare August 27, 2025 20:48
@graphite-app graphite-app bot changed the base branch from 08-27-refactor_benchmarks_linter_benchmark_re-run_parsing_and_semantic_on_each_iteration to graphite-base/13336 August 27, 2025 21:42
@graphite-app graphite-app bot force-pushed the 08-27-refactor_semantic_store_comments_as_a_slice_instead_of_vec_ branch from cb2a00e to 420921a Compare August 27, 2025 21:48
@graphite-app graphite-app bot force-pushed the graphite-base/13336 branch from 5574085 to 7fdd478 Compare August 27, 2025 21:48
@graphite-app graphite-app bot changed the base branch from graphite-base/13336 to main August 27, 2025 21:48
@graphite-app graphite-app bot force-pushed the 08-27-refactor_semantic_store_comments_as_a_slice_instead_of_vec_ branch from 420921a to cfcbe76 Compare August 27, 2025 21:48
@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Aug 27, 2025
Copy link
Member Author

overlookmotel commented Aug 27, 2025

Merge activity

`Semantic` storing comments as a `&Vec<Comment>` involves unnecessary indirection (pointer to a pointer). Store as `&[Comment]` slice instead.
@graphite-app graphite-app bot force-pushed the 08-27-refactor_semantic_store_comments_as_a_slice_instead_of_vec_ branch from cfcbe76 to d787517 Compare August 27, 2025 22:28
@graphite-app graphite-app bot merged commit d787517 into main Aug 27, 2025
24 checks passed
@graphite-app graphite-app bot deleted the 08-27-refactor_semantic_store_comments_as_a_slice_instead_of_vec_ branch August 27, 2025 22:33
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Aug 27, 2025
graphite-app bot pushed a commit that referenced this pull request Aug 28, 2025
After #13336, we can derive `Default` on `Semantic`.

This is not so useful in most cases, but does allow using `std::mem::take` on a `&mut Semantic`, which is used in next PR in this stack.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-semantic Area - Semantic C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants